
<%@ page import="ar.org.sstuyv.Partido"%>
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName"
	value="${message(code: 'partido.label', default: 'Partido')}" />
<title><g:message code="default.list.label" args="[entityName]" /></title>

<jq:resources />
<jqui:resources />
<jqgrid:resources />

<script type="text/javascript">
			// Here we set a globally the altRows option
			jQuery.extend(jQuery.jgrid.defaults, { 
				altRows: true,
				altclass: 'teams-alt-class'  
				});
		</script>

<script type="text/javascript">

			$(function(){
				var lastSel
			  $("#teamsAdvanced").jqGrid({
			    url:'${createLink(action: 'listAdvancedJSON')}',
			    editurl: '/SIG/partido/edit',
			    datatype: 'json',
			    mtype: 'GET',
			    colNames:['Codigo', 'Nombre','codcatas'],
			    colModel :[ 
			      {name:'codigo', editable:true, index:'codigo', width:90}, 
			      {name:'nombre', editable:true, index:'nombre', width:400},
			      {name:'codcatas', editable:true, 
				      editoptions: {maxlength: 3}, editrules:{number:true}, index:'codcatas', width:100, align:'right'}
			    ],
			    pager: '#pagerAdvanced',
			    rowNum:20,
			    rowList:[20,30,40,50],
			    sortname: 'id',
			    sortorder: 'desc',
			    height: "100%",
			    viewrecords: true,
			    gridview: true,
			    caption: 'Partidos',

			  jQuery("#teamsAdvanced").jqGrid('navGrid', '#pagerAdvanced'),
					  { view: true, edit: true, add: true, del: true, search: false }, 
					  {}, // use default settings for edit
					  {url:'${createLink(action: 'save')}'}, // use default settings for add
					  {url:'${createLink(action: 'delete')}'},  // delete instead that del:false we need this
					  {});

			  
			  //jQuery("#teamsAdvanced").jqGrid('inlineNav',"#pagerAdvanced");
			  jQuery("#teamsAdvanced").filterToolbar({});
			   
			});
		
			)

			 			 
		</script>

</head>
<body>
<a href="#list-partido" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link controller='logout'>Salir</g:link></li>
			</ul>
		</div>
	<div class="list">
		<table id="teamsAdvanced"></table>
		<div id="pagerAdvanced"></div>
	</div>
</body>
</html>
